
CREATE TABLE IF NOT EXISTS `#__xplike` (
  `id` INTEGER NOT NULL AUTO_INCREMENT COMMENT 'xplike table id',
  `likes` INT(11)  NOT NULL ,
  `content_id` INT(11)  NOT NULL ,
  `component` VARCHAR(255)  CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
  `dislikes` INT(11)  NOT NULL ,
  `state` TINYINT(3) NOT NULL DEFAULT '0',
  `ordering` INTEGER NOT NULL DEFAULT '0',
  `metakey` TEXT NOT NULL,
  `metadesc` text NOT NULL,
  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `created_by` int(10) unsigned NOT NULL DEFAULT '0',
  `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` int(10) unsigned NOT NULL DEFAULT '0',
  `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
  `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `language` char(7) NOT NULL DEFAULT '',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='';

CREATE TABLE IF NOT EXISTS `#__xplike_log` (
  `id` INTEGER NOT NULL AUTO_INCREMENT COMMENT 'xplike_log table id',
  `component` VARCHAR(255)  CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
  `ipaddress` VARCHAR(255)  CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
  `value` INT(3)  NOT NULL  COMMENT '',
  `content_id` INT(11)  NOT NULL ,
  `user_id` INT(11)  NOT NULL ,
  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='';
